package com.lingyuan.cart.service;

import com.lingyuan.cart.domain.CartEntity;
import com.lingyuan.cart.domain.CheckCart;

import java.util.List;

public interface CartService {
    /* *
     * @Title: addCart
     * @Author: DELL
     * @Date: 2024-09-20 09:42:21
     * @Params: [productId, payNum]
     * @Return: void
     * @Description: 添加购物车
     */
    void addCart(Long skuId, Integer payNum);
    /* *
     * @Title: updateCart
     * @Author: DELL
     * @Date: 2024-09-20 09:42:30
     * @Params: [skuId, payNum]
     * @Return: void
     * @Description: 修改购物车数量
     */
    void updateCart(Long skuId, Integer payNum);
    /* *
     * @Title: getCartEntityList
     * @Author: DELL
     * @Date: 2024-09-20 09:42:45
     * @Params: []
     * @Return: List<CartEntity>
     * @Description: 查询当前登录用户购物车
     */
    List<CartEntity> getCartEntityList();

    /* *
     * @Title: findBySkuIdsCartEntityList
     * @Author: DELL
     * @Date: 2024-09-20 09:42:45
     * @Params: [skuIds]
     * @Return: List<CartEntity>
     * @Description: 查询选中的购物车记录
     */
    List<CartEntity> findBySkuIdsCartEntityList(String skuIds);
    /* *
     * @Title: deleteCart
     * @Author: DELL
     * @Date: 2024-09-20 09:42:53
     * @Params: [skuId]
     * @Return: void
     * @Description: 删除购物车
     */
    void deleteCart(Long skuId);
    /* *
     * @Title: deleteBatchCart
     * @Author: DELL
     * @Date: 2024-09-20 09:42:53
     * @Params: [skuIds]
     * @Return: void
     * @Description: 批量删除购物车
     */
    void deleteBatchCart(List<Long> skuIds);

    /* *
     * @Title: checkCart
     * @Author: DELL
     * @Date: 2024-09-22 09:56:13
     * @Params: [skuIds]
     * @Return: CheckCart
     * @Description: 计算购物车总价格
     */
    CheckCart checkCart(String skuIds);
}
